package com.yorge.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT8001", fallbackFactory = PaymentClientFallbackFactory.class,
    path = "/payment/hystrix")
//@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT8001")
//@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT8001", fallback = PaymentClientFallback.class)
public interface PaymentClient {
    @GetMapping("/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/timeout/{id}")
    public String paymentInfo_TimeOut(@PathVariable("id") Integer id);
}

